package br.com.fatec.cqr.control;

public class Expressoes {

	public String deleteFromPessoa(String texto) {

		int indexOf = texto.indexOf("from");
		String tabela = texto.substring(indexOf + 4, texto.length());
		String regex = "(delete\\*from)(" + tabela + ")";

		return texto.replaceAll(regex, "db.$2.remove()");
	}

}
